﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Wicture.QPZS.EPC.API.Domain.Entities;

namespace Wicture.QPZS.EPC.API.Throtteds
{
    public abstract class CostThrottled : IThrottled
    {
        public decimal Order => 1;

        public abstract List<ServicePackageType> ServicePackageTypes { get; }

        public virtual void Invoke(ThrottlingContext context)
        {
            if (!context.IsSuccess)
            {
                return;
            }
            InvokeMethod(context);
        }

        public abstract void InvokeMethod(ThrottlingContext context);
    }
}
